import request from '@/utils/request'

// 查询病历列表
export function listCase(query) {
  return request({
    url: '/erp/case/list',
    method: 'get',
    params: query,
  })
}

// 查询病历详细
export function getCase(id) {
  return request({
    url: '/erp/case/' + id,
    method: 'get',
  })
}

// 新增病历
export function addCase(data) {
  return request({
    url: '/erp/case',
    method: 'post',
    data: data,
  })
}

// 修改病历
export function updateCase(data) {
  return request({
    url: '/erp/case',
    method: 'put',
    data: data,
  })
}

// 删除病历
export function delCase(id) {
  return request({
    url: '/erp/case/' + id,
    method: 'delete',
  })
}

// 导出病历
export function exportCase(query) {
  return request({
    url: '/erp/case/export',
    method: 'get',
    params: query,
  })
}
